#ifndef SROVERVIEWWIDGET_H
#define SROVERVIEWWIDGET_H

#include <QWidget>
#include <QModelIndex>

class QLabel;
class QStandardItemModel;
class QTableView;
class QSpinBox;

class SROverviewWidget : public QWidget
{

    Q_OBJECT

public:

    explicit SROverviewWidget(QWidget *parent = 0);

protected:

    virtual void showEvent(QShowEvent *event);



    QString getTodayTotalConsumption(int& out_sum_size);

private:

    qlonglong getFileTotalConsumption(const QString &_data);

signals:

public slots:


    // 更新概览数据
    void onUpdate(void);

private Q_SLOTS:


    void onClicked(const QModelIndex &_index);

    void onNextPage(int _idx);


private:

    QLabel* labAuditSum_;
    QLabel* labMoneySum_;
    QLabel* labLogCount_;
    QStandardItemModel *model_;
    QTableView* tableView_;

    QSpinBox* boxPageNum_;

private:

    int iPageNum_;


};

#endif // SROVERVIEWWIDGET_H
